<form action="{:U()}" method="post" class="layui-form layui-box" ajaxSubmit>

<icy8:formItem label="用户组" help="角色用户组">
    <Html:select name="group_id" selected="info['UserGroupAccess']['group_id']" options="groups" />
</icy8:formItem>
    <icy8:formItem label="头像" help="用户头像">
        <icy8:widget src="Common/Form/img_crop" use="$info">
            return [
            'name'=>'avatar',
            'limit'=>1,
            'width'=>450,
            'height'=>450,
            'value'=>$info['avatar']];
        </icy8:widget>
    </icy8:formItem>
<icy8:formItem label="昵称" help="昵称或真实姓名">
    <input name="nickname" value="{$info.nickname}" placeholder="昵称" class="layui-input"/>
</icy8:formItem>

<icy8:formItem label="用户名" help="用于登陆的用户名">
    <input name="username" value="{$info.username}" placeholder="用户登录所用" class="layui-input"/>
</icy8:formItem>

<if condition="$info">
    <icy8:formItem label="用户密码" help="如果不修改密码请留空">
        <input name="password" value="" placeholder="用户登录所用" class="layui-input"/>
    </icy8:formItem>
<else/>
    <icy8:formItem label="用户密码" help="用于登陆的密码">
        <input name="password" value="" placeholder="用户登录所用" class="layui-input"/>
    </icy8:formItem>
</if>

<icy8:formItem label="Email">
    <input name="email" value="{$info.email}" placeholder="Email" class="layui-input"/>
</icy8:formItem>

<icy8:formItem label="手机号" help="手机号码">
    <input name="phone" value="{$info.phone}" placeholder="手机号" class="layui-input"/>
</icy8:formItem>

<icy8:formItem label="用户状态" help="" pane="1">
    <input type="radio" name="status" value="1" title="正常"
    <if condition="$info['status'] eq 1 or !isset($info['status'])">checked</if>
    />
    <input type="radio" name="status" value="0" title="禁用"
    <if condition="isset($info['status']) and $info['status'] eq 0">checked</if>
    />
</icy8:formItem>
<icy8:formItem label="">
    <input type="hidden" name="id" value="{$info.id}"/>
    <icy8:button title="保存"/>
    <icy8:button title="取消" click="ICY8.closeThisDialog(this)" btnType="primary" type="button"/>
</icy8:formItem>
</form>